﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BusinessLayer.VDataEntities {
    public class VTicketEntity : VSuperTicket
    {

        public string OrderNumber
        {
            get
            {
                return setOrderNumber("CG", TicketID,this.User.ClientID,this.ApplicationID);
            }
        }
        public override string ToString()
        {
            return "\r\nApplicationID:" + this.ApplicationID
                + "\r\nAssignDate:" + this.AssignDate
                + "\r\nSubmitDate:" + this.SubmitDate
                + "\r\nTicketID:" + this.TicketID
                + "\r\nOrderNumber:" + OrderNumber
                + "\r\nIssueType:" + this.IssueType
                 + "\r\nResolveDate:" + this.ResolveDate;
        }
        //设置订单号
        private string setOrderNumber(string extraMessage, long applicationID=0,params object[] args)
        {
            StringBuilder messageBuilder = new StringBuilder();
            messageBuilder.Append(applicationID);
            foreach (object obj in args)
            {
                messageBuilder.Append(obj.ToString());
            }
            return extraMessage  + messageBuilder.ToString();
        }

    }
}
